@basis-grid: 5px;

// 换算flex
.getFlex(@grow:1, @shrink:1, @basis: 0) {
  flex: @grow @shrink @basis
}

// 换算字体大小
.getFontSize(@var) {
  font-size: @var;
}
// 边线
.getBorder(@direction) when (@direction = 'top') {
  border-top: 1px solid var(--fuse-gray-color-1)
}
.getBorder(@direction) when (@direction = 'right') {
  border-right: 1px solid var(--fuse-gray-color-1)  
}
.getBorder(@direction) when (@direction = 'bottom') {
  border-bottom: 1px solid var(--fuse-gray-color-1)  
}
.getBorder(@direction) when (@direction = 'left') {
  border-left: 1px solid var(--fuse-gray-color-1)  
}

// 换算margins
.getMargins(@ratio: 0, @direction) when (@direction = 'top') {
  margin-top: @ratio * @basis-grid;
}
.getMargins(@ratio: 0, @direction) when (@direction = 'right') {
  margin-right: @ratio * @basis-grid;
}
.getMargins(@ratio: 0, @direction) when (@direction = 'bottom') {
  margin-bottom: @ratio * @basis-grid;
}
.getMargins(@ratio: 0, @direction) when (@direction = 'left') {
  margin-left: @ratio * @basis-grid;
}

// 换算paddings
.getPaddings(@ratio: 0, @direction) when (@direction = 'top') {
  padding-top: @ratio * @basis-grid;
}
.getPaddings(@ratio: 0, @direction) when (@direction = 'right') {
  padding-right: @ratio * @basis-grid;
}
.getPaddings(@ratio: 0, @direction) when (@direction = 'bottom') {
  padding-bottom: @ratio * @basis-grid;
}
.getPaddings(@ratio: 0, @direction) when (@direction = 'left') {
  padding-left: @ratio * @basis-grid;
}

//获取稍微粗一点的字体
.getHeavier(@color, @weight: .3px) {
  // text-stroke: @weight @color;
  // -webkit-text-stroke: @weight @color;
}

//获取ellpsis
.getEllipsis(@rows: 1) {
  display: -webkit-box;
  text-overflow: ellipsis;
  word-break: break-all;
  -webkit-line-clamp: @rows;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

// 文字两端对齐
.getTextJustify(@width: 58px) {
  width: @width;
  text-align: justify;
  text-justify: distribute-all-lines; // 这行必加，兼容ie浏览器
  text-align-last: justify;
  text-wrap: nowrap;
}